import api from '@/utils/request'

export default class typeApi {
    /**
     * @description 创建类型
     * @param data
     */
    static create = (data: any) => api({
        url: '/type/create/', // 请求地址
        method: 'post',
        data
    })

    /**
     * @description 房间类型查询
     * @param data
     */
    static list = (data: any) => api({
        url: '/type/list/', // 请求地址
        method: 'get',
        params: data
    })


    /**
     * @description 修改
     * @param data
     */
    static edit = (data: any) => api({
        url: '/type/edit/', // 请求地址
        method: 'post',
        data
    })


    static listTree = () => api({
        url: '/type/list-tree/', // 请求地址
        method: 'get'
    })


    static deleteType = (id: any) => api({
        url: `/type/delete/${id}`, // 请求地址
        method: 'post',
    })
}